package com.kara.webapp.pages.admin.student;

import org.apache.tapestry5.annotations.ActivationRequestParameter;
import org.apache.tapestry5.annotations.BeginRender;
import org.apache.tapestry5.annotations.Component;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.kara.entity.Clazz;
import com.kara.service.ClazzManager;
import com.kara.webapp.components.student.StudentForm;


public class StudentEdit {


  @ActivationRequestParameter
  private long clazzId;

  @Inject
  private ClazzManager clazzManager;
  
  @Component
  private StudentForm form;
  
  private Clazz currentClazz;
  
  public void setClazzId(long clazzId) {
    this.clazzId = clazzId;
  }
  
  
  @BeginRender
  void setUp(){
    currentClazz = clazzManager.getClazz(clazzId);
  }
  
}
